package com.example.demo.simplefactory01;

public class OperationFactory {
    public static Operation createOperation(String operate){
        Operation oper = null;
        switch (operate){
            case "+":
                oper = new OperationAdd();
                break;
            case "-":
                oper = new OperationDiv();
                break;
            default:
                break;
        }
        return oper;
    }
}
